<?php
/**
 * Created by Benjiemin
 * Date: 2020/2/26
 * Time: 17:13
 */
require ('./aip-php-sdk-2.2.15\AipOcr.php');
$filename = 'verify.jpeg';
$appId = '9360309';
$apiKey = 'f94FyaKX2LKx0GWBoddFVpxa';
$secretKey = 'oGhM9QqHH6qslErF1LH8etP6Ber5adDz';
$apiOcrModel = new AipOcr($appId, $apiKey, $secretKey);
$filename = './verify.jpeg';
$verifyRet = $apiOcrModel->basicGeneral( file_get_contents($filename ));
if(isset($verifyRet['words_result'][0]['words'])){
    echo $verifyRet['words_result'][0]['words'];
}